oTable = $('#sales-table').dataTable({

                "bProcessing": true,

                "sAjaxSource": "data/data.txt",

                "sAjaxDataProp": "aaData",

                "sDom": "<'row'<'span6'><'span6'l>r>t<'row'<'span6'i><'span6'p>>",

 

                "aoColumnDefs": [

                      {

                          "mData": function (source) {

                              return "<img src='" + source.cover + "'/>"

                          }, "aTargets": [0], "sTitle": "Title", "iDataSort": 1

                      },

                      { "mData": "title", "sWidth": "30%", "sClass": "align-left", "aTargets": [1] },

                      { "mData": "firstPublished", "sWidth": "10%", "sTitle": "First Published", "aTargets": [2] },

                      { "mData": "editions", "sWidth": "10%", "sTitle": "Editions", "aTargets": [3] },

                      { "mData": "shippedYear", "sWidth": "20%", "sTitle": "Shipped(Year)", "aTargets": [4] },

                      { "mData": "soldYear", "sWidth": "20%", "sTitle": "Sold(Year)", "sClass": "lastColumn", "aTargets": [5] }

                ],

                "fnInitComplete": function () {

 

                    var head = $($("#sales-table th")[1]);

                    var x = $('<input/>', {

                        value: "Search for a Title",

                        class: "search_init"

                    }).appendTo(head).click(function (e) {

                        e.stopPropagation();

                    }).keyup(function () {

                        oTable.fnFilter(this.value, [1])

                    }).focus(function () {

                        if (this.className == "search_init") {

                            this.className = "";

                            this.value = "";

                        }

                    }).blur(function () {

                        if (this.value == "") {

                            this.className = "search_init";

                            this.value = "Search for a Title";

                        }

                    }).css({

                        "marginLeft": 10,

                        "backgroundColor": "#525252",

                        "color": "white",

                        "border": "none",

                        "borderBottom": "2px solid darkgray",

                        "outline": "none"

                    })

                }

            });